﻿@model AC.Service.DTO.Blog.Sections
@{
    Layout = "../Shared/_LayoutBootstrap.cshtml";
    ViewBag.Title = @Model.Title;
}

@*@section styles{
    <style type="text/css">
        .content11 {
            width: 300px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }
    </style>
}*@
@*<div class="bs-docs-header" id="content" tabindex="-1">
    <div class="container">
        <h1>@Model.Title</h1>
        <p class="content11">@Model.Content</p>
    </div>
</div>*@

<div class="container bs-docs-container">
    <div class="row">
        <div class="col-md-9" role="main">
            <div class="bs-docs-section">
                <h1 id="@Model.SectionId" class="page-header">@Model.Title</h1>
                @Html.Raw(Model.Content)
                @if (Model.Childs != null)
                {
                    foreach (var child in Model.Childs)
                    {
                        <h2 id="@child.SectionId">
                            @child.Title
                        </h2>
                        @Html.Raw(child.Content)
                    }
                }
            </div>
        </div>
        <div class="col-md-3" role="complementary">
            <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix-top">
                <ul class="nav bs-docs-sidenav">
                    <li>
                        <a href="#@Model.SectionId">@Model.Title</a>
                        @if (Model.Childs != null || Model.Anchors != null)
                        {
                            <ul class="nav">
                                @if (Model.Anchors != null)
                                {
                                    foreach (var anchor in Model.Anchors)
                                    {
                                        <li><a href="#@anchor.AnchorId">@anchor.AnchorText</a></li>
                                    }
                                }
                                @if (Model.Childs != null)
                                {
                                    foreach (var child in Model.Childs)
                                    {
                                        <li><a href="#@child.SectionId">@child.Title</a></li>
                                        if (child.Anchors != null)
                                        {
                                            foreach (var childAnchor in child.Anchors)
                                            {
                                                <li><a href="#@childAnchor.AnchorId">@childAnchor.AnchorText</a></li>
                                            }
                                        }
                                    }
                                }
                            </ul>
                        }
                    </li>
                </ul>
                <a class="back-to-top" href="#top">
                    返回顶部
                </a>
                <a href="javascript:;" class="bs-docs-theme-toggle" role="button">
                    主题预览
                </a>
            </nav>
        </div>
    </div>
</div>
